﻿using FluentValidation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WebMediaTRApi.Commands;
using WebMediaTRApi.WeatherForcasts.Querys;

namespace WebMediaTRApi.WeatherForcasts.Validators
{
  

    public class CreateWeatherCommandValidator : AbstractValidator<CreateWeatherCommand>
    {
        public CreateWeatherCommandValidator()
        {
            RuleFor(c => c.Date).NotEmpty();
            RuleFor(c => c.TemperatureC).GreaterThan(-10);
            RuleFor(c => c.TemperatureC).LessThan(55);
        }
    }
}
